// JavaScript Document
$(document).ready(function() {
	//category dropdown
	$(".home-category li").mouseover(function(){
		$(this).children(".dropdown").css({"display":"block"});
	});
	$(".home-category li").mouseout(function(){
		$(this).children(".dropdown").css({"display":"none"});
	});
	//hero banner carousel
    
    var count = $('#event_ad div.carousel-inner div.item').length;
    var NumWrap = $('#event_ad ol.carousel-indicators');    
    for(var i=0;i<count;i++){
        if(i==0){
            $(NumWrap).append('<li data-target="#event_ad" data-slide-to="'+ i +'" class="active"></li>');
        }else{
            $(NumWrap).append('<li data-target="#event_ad" data-slide-to="'+ i +'"></li>');
        }        
    }
        
    $('#event_ad').carousel({
	  interval: 3000
	})
	//hero banner carousel under 960 version
    $('#event_ad-960').carousel({
	  interval: 3000
	})
});